import { createWebHistory, createRouter } from "vue-router";
import { routes, addDynamicRoutes } from "./routes";
import type { App } from "vue";

export const router = createRouter({
  history: createWebHistory(),
  routes: routes,
});

export function setupRouter(app: App) {
  addDynamicRoutes(router);
  app.use(router);
}
